package com.demo.web;


import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.demo.web.api.RequestDTO;
import com.demo.web.api.ResDTO;
import com.outstanding.framework.plugin.swagger2.annotation.ApiError;
import com.outstanding.framework.plugin.swagger2.annotation.ApiErrors;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;





@Api(tags = "演示swagger接口")
@Controller
@RequestMapping("/user")
public class SwaggerDemoController {
	

	
	@ApiErrors({
		@ApiError(code = "S1001", message = "输入的参数号不能为空"),
        @ApiError(code = "S9999", message = "系统异常")
	})
	@ApiOperation(value = "demo返回一个字符串的接口，这个是描述这个接口干嘛的")
	@RequestMapping(method = RequestMethod.POST, value = "/query.do", produces = MediaType.APPLICATION_JSON_VALUE)
	public @ResponseBody ResDTO demoString(@RequestBody RequestDTO dto) {
		return null;
	}

	@ApiErrors({
		@ApiError(code = "D4321", message = "测试2"),
		@ApiError(code = "D4322", message = "测试222")
	
	})
	@ApiOperation(value = "query2接口,主要职能是。。。。。。")
	@RequestMapping(method = RequestMethod.GET, value = "/query2.do", produces = MediaType.APPLICATION_JSON_VALUE)
	public @ResponseBody ResDTO returnDemo() {
		return new ResDTO();
	}
}
